Skip to content

Fix mode home responsive layout consistency#1124

Merged
BigSimmo merged 38 commits into
mainfrom
codex/apply-phone-layout-to-all-home-pages
Jul 24, 2026
Merged

Fix mode home responsive layout consistency#1124
BigSimmo merged 38 commits into
mainfrom
codex/apply-phone-layout-to-all-home-pages

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix cross-mode search performance findings: prescribing catalogue debounce/abort/fields=index, differentials abort/debounce, universal documents typeahead soft-timeout (750ms), shared (search-app) shell to avoid composer remount, and Answer rate-limit in-memory fallback outside production.
  • Fix Bugbot regressions: shared-shell pathname navigation (/services/dsm) syncs searchMode during render (no stale-mode paint) even when the query string is unchanged; extracted ClinicalDashboard lazy imports to stay under the maintainability budget.

RAG impact: no retrieval behaviour change — typeahead documents domain timeout and shell URL sync only; ranking formulas and full /api/search retrieval path unchanged.

Verification

  • npm run verify:pr-local — focused Vitest on touched sources (362) plus api-rate-limit / search-shell / universal / route / site-map suites green; docs:check-index OK
  • UI verification not run: full verify:ui not required for this pass; mode-home smoke via npm run ensure returned HTTP 200 for /, /services, /dsm, /documents/search, /therapy-compass, /?mode=prescribing, and /api/answer/stream returned 200 after the rate-limit fallback fix
  • Verification not run: eval:retrieval:latency / soak / live OpenAI canary — approval-gated provider work; not needed for timeout-only typeahead change

Risk and rollout

  • Risk: medium — shared layout remount change and rate-limit fallback behaviour in non-production; production Answer/upload still fail closed when the durable limiter is unavailable
  • Rollback: revert this PR; mode routes return to per-segment GlobalSearchShell layouts and prior timeout/fallback behaviour
  • Provider or production effects: None

Clinical Governance Preflight

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains [REDACTED] ([REDACTED])
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes

  • Prescribing list rows keep the full catalogue payload so Safety/Monitoring filters and patient alerts still see section-derived signals; keystroke storms are controlled by debounce + abort. fields=index remains for identity-only consumers (cross-mode links).
  • Live hybrid RPC cold tails remain a separate approval-gated follow-up.

@supabase

supabase Bot commented Jul 24, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@cursor[bot], you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ecb96dc3-2a7e-43ce-9ab5-01a4d6a18168

📥 Commits

Reviewing files that changed from the base of the PR and between 62c0a05 and 41d5582.

📒 Files selected for processing (1)
  • docs/branch-review-ledger.md
📝 Walkthrough

Walkthrough

Mobile and tablet dashboard homes now determine when the hero owns the shared composer. Reserve calculation, responsive action styling, and UI contracts were updated to keep the composer in the hero and remove the bottom dock in those cases.

Changes

Mobile composer layout

Layer / File(s) Summary
Hero ownership and reserve wiring
src/components/ClinicalDashboard.tsx, src/components/clinical-dashboard/mobile-composer-reserve.ts
Prescribing and differentials home conditions now control hero composer ownership, which drives idle reserve behavior and the header breakpoint.
Mode home responsive layout
src/components/mode-home-template.tsx
Action cards use phone-stack styling through the large breakpoint, with separators limited to non-large layouts.
Composer and responsive validation
tests/mobile-composer-reserve.test.ts, tests/therapy-compass-responsive-contract.test.ts, tests/ui-smoke.spec.ts, tests/ui-tools.spec.ts, docs/branch-review-ledger.md
Tests validate hero composer placement, idle reserves, absent phone docks, updated grid behavior, and recorded review sweeps.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and related to the main responsive mode-home layout changes, though it omits other scoped search-shell fixes.
Description check ✅ Passed The description follows the template with Summary, Verification, Risk and rollout, Clinical Governance Preflight, and Notes sections.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/apply-phone-layout-to-all-home-pages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • Static PR checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #4960 (success).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@BigSimmo
BigSimmo marked this pull request as ready for review July 24, 2026 03:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a25bc2ff15

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/ClinicalDashboard.tsx Outdated
Comment thread src/components/mode-home-template.tsx Outdated
@BigSimmo

Copy link
Copy Markdown
Owner Author

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Resolved the hero-owned phone composer reserve issue by deriving heroComposerBreakpoint, detecting when the hero owns the phone composer, and suppressing the mobile bottom-dock reserve in that state. src/components/ClinicalDashboard.tsxL3103-L3106
  • Reused the computed hero composer breakpoint when rendering MasterSearchHeader, keeping the header/composer ownership logic aligned with the reserve calculation. src/components/ClinicalDashboard.tsxL3404-L3408
  • Preserved large-breakpoint card top borders by removing the lg:border-t-0 override from subsequent mode-home actions. src/components/mode-home-template.tsxL287-L289
  • Committed the scoped fix as d16ede1 (Fix mode home mobile composer reserves) and created PR metadata with the required make_pr tool.

Testing

  • git diff --check
  • npm run verify:pr-local -- --dry-run --files src/components/ClinicalDashboard.tsx,src/components/mode-home-template.tsx
  • ⚠️ npm run test:focused -- --files src/components/ClinicalDashboard.tsx,src/components/mode-home-template.tsx (environment limitation: node_modules/vitest/vitest.mjs is missing, and this shell resolves Node v20.20.2 while the repo requires Node 24.x)

View task →

BigSimmo and others added 3 commits July 24, 2026 12:05
Hero-owned phone composers no longer reserve a blank dock band, mode-home card top borders stay intact at lg, and contracts/UI expectations match the shared phone hero layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@BigSimmo
BigSimmo enabled auto-merge July 24, 2026 04:45

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 961003e23a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/ClinicalDashboard.tsx Outdated
BigSimmo and others added 3 commits July 24, 2026 13:16
Base heroOwnsPhoneComposer on the mounted desktopHomeComposerSlotId so
setup/error answer-home states keep phone dock clearance instead of the
idle pad that lets the fixed composer cover the error message.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b38a44ad86

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/ClinicalDashboard.tsx
cursoragent and others added 4 commits July 24, 2026 06:16
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
GraphQL review-thread reply returned 403; resolved the fixed thread directly after validation.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo
BigSimmo disabled auto-merge July 24, 2026 06:50
@BigSimmo

Copy link
Copy Markdown
Owner Author

@codex resolve the merge conflicts here please

src/components/ClinicalDashboard.tsx
docs/branch-review-ledger.md

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Testing

  • git diff --cached --check
  • npm run verify:pr-local -- --dry-run --files src/components/ClinicalDashboard.tsx,docs/branch-review-ledger.md
  • ⚠️ test -f node_modules/vitest/vitest.mjs && echo vitest-present || echo vitest-missing (warning: focused Vitest was not run because vitest is missing in node_modules; this shell also reports Node v20.20.2 while the repo expects Node 24.x)

Status

  • Current branch: work
  • Worktree: clean after commit.
  • No provider-backed checks were run.

View task →

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Merged origin/main into the current PR branch and committed the conflict resolution as 98f18a1 (Merge main into mode home layout PR).
  • Resolved src/components/ClinicalDashboard.tsx by retaining the PR’s heroOwnsPhoneComposer calculation while keeping origin/main’s hidden dock reserve guidance at 0rem. src/components/ClinicalDashboard.tsxL3117-L3126
  • Resolved docs/branch-review-ledger.md by preserving both the PR Fix mode home responsive layout consistency #1124 babysit ledger row and the incoming search chrome behaviour review entry from origin/main. docs/branch-review-ledger.mdL714-L722
  • Incorporated the incoming search chrome behaviour instructions from origin/main, including the zero hidden-reserve rule that informed the dashboard conflict resolution. AGENTS.mdL210-L223
  • Created PR metadata with the required make_pr tool using title: Resolve mode home layout merge conflicts.

Testing

  • git diff --check
  • npm run verify:pr-local -- --dry-run --files src/components/ClinicalDashboard.tsx,docs/branch-review-ledger.md
  • ⚠️ npm run test:focused -- --files src/components/ClinicalDashboard.tsx (environment limitation: node_modules/vitest/vitest.mjs is missing, and this shell resolves Node v20.20.2 while the repo expects Node 24.x)

Worktree is clean on branch work at commit 98f18a1.

View task →

cursoragent and others added 3 commits July 24, 2026 07:37
# Conflicts:
#	docs/branch-review-ledger.md
#	src/components/ClinicalDashboard.tsx

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
@BigSimmo
BigSimmo enabled auto-merge July 24, 2026 11:07

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8adaaf2298

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/ClinicalDashboard.tsx

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d48f67c15

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/branch-review-ledger.md
@BigSimmo

Copy link
Copy Markdown
Owner Author

@cursoragent fix merge conflict and failing CI and resolve open comments

@cursor

cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Fixed merge conflicts, CI, and open review threads on PR #1124.

  • Merged origin/main — PR is MERGEABLE again
  • Removed the duplicated PR Self-host Geist fonts to fix local Next.js startup #1149 ledger row (Static PR checks failure)
  • Gated Differentials hero slot with !(query.trim() && documentMatches.length > 0) so stale evidence drafts keep dock reserve
  • Resolved both open Codex threads (0 unresolved left)

Head: 55a4a61d. Verified: ledger guard pass, maintainability 4132/4140, mobile-composer-reserve 9/9.

Open in Web Open in Cursor 

cursoragent and others added 4 commits July 24, 2026 16:05
Resolve merge drift with main so the phone-layout branch can land
without conflicting ledger/site-map/header-band updates.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Gate the Differentials hero composer slot so a typed draft with leftover
evidence matches stays on the phone dock path, and drop the duplicated
PR #1149 branch-review ledger row blocking Static PR checks.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Record the merge/CI/thread cleanup pass for the mode-home phone layout PR.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
cursoragent and others added 5 commits July 24, 2026 17:13
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
…out-to-all-home-pages

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 382d4c3b76

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/branch-review-ledger.md
cursoragent and others added 5 commits July 24, 2026 19:04
…out-to-all-home-pages

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Add a main-push workflow and local helper that update behind PR heads so
GitHub stops falsely marking the queue CONFLICTING/DIRTY after each land.
Bump postcss to a non-vulnerable release so Safety npm audit stays green.
cursor Bot pushed a commit that referenced this pull request Jul 24, 2026
* docs(ledger): record babysit sweep for PRs #1124 #1131 #1146 #1157 #1162 #1167 #1169 #1170

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs(ledger): record open-PR conflict-resolution sweep and #1162 Bugbot

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs(ledger): record #1162 conflict resolution and Bugbot outcome

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs(ledger): record open-PR conflict sync (all mergeable)

Merged origin/main into remaining behind/dirty PR heads so every open PR is MERGEABLE with behind=0.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs(ledger): drop exact duplicate #1170 review row

Remove the second identical PR #1170 ledger record so check:branch-review-ledger passes.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs(ledger): record open-PR conflict sync for 22 PRs

Merged origin/main into every open PR head so all are current with main.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* docs(ledger): drop exact duplicate review rows

Remove duplicate ledger records so check:branch-review-ledger passes after the conflict sync.

Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>

* fix: auto-sync open PR branches and clear postcss audit

Add a main-push workflow and local helper that update behind PR heads so
GitHub stops falsely marking the queue CONFLICTING/DIRTY after each land.
Bump postcss to a non-vulnerable release so Safety npm audit stays green.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: BigSimmo <BigSimmo@users.noreply.github.com>
Exact duplicate review records from union merges failed check:branch-review-ledger.
@BigSimmo
BigSimmo merged commit 8c981d9 into main Jul 24, 2026
18 checks passed
@BigSimmo
BigSimmo deleted the codex/apply-phone-layout-to-all-home-pages branch July 24, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants